function __ShowDesktopSettingsDialog(t){if(!t)t=window.event;new BX.CAdminDialog({title:BX.message("langGDSettingsDialogTitle"),content_url:"/bitrix/components/bitrix/desktop/admin_settings.php?lang="+language_id+"&bxpublic=Y",content_post:"sessid="+bxsessid+"&type=desktop&desktop_page="+desktopPage,draggable:true,resizable:true,buttons:[BX.CAdminDialog.btnSave,BX.CAdminDialog.btnCancel]}).Show()}function __ShowDesktopAllSettingsDialog(t){if(!t)t=window.event;new BX.CDialog({title:BX.message("langGDSettingsAllDialogTitle"),content_url:"/bitrix/components/bitrix/desktop/admin_settings_all.php?lang="+language_id+"&bxpublic=Y",content_post:"sessid="+bxsessid+"&desktop_backurl="+desktopBackurl,draggable:true,resizable:true,buttons:[BX.CDialog.btnSave,BX.CDialog.btnCancel]}).Show()}function __ShowDesktopAddDialog(t){if(!t)t=window.event;new BX.CAdminDialog({title:BX.message("langGDSettingsDialogTitle"),content_url:"/bitrix/components/bitrix/desktop/admin_settings.php?lang="+language_id+"&bxpublic=Y",content_post:"sessid="+bxsessid+"&type=desktop&desktop_page="+desktopPage+"&action=new&desktop_backurl="+desktopBackurl,draggable:true,resizable:true,buttons:[BX.CAdminDialog.btnSave,BX.CAdminDialog.btnCancel]}).Show()}var allAdminGagdgetHolders=[];function getAdminGadgetHolder(t){return allAdminGagdgetHolders[t]}BX.AdminGadget=function(t,e){BX.AdminGadget.superclass.constructor.apply(this,arguments);allAdminGagdgetHolders[this.gadgetHolderID]=this};BX.extend(BX.AdminGadget,BXGadget);BX.AdminGadget.prototype.ShowSettings=function(t,e){new BX.CAdminDialog({title:e,content_url:"/bitrix/components/bitrix/desktop/admin_settings.php?lang="+language_id+"&bxpublic=Y",content_post:"sessid="+bxsessid+"&type=gadget&gd_ajax="+this.gadgetHolderID+"&gid="+t+"&desktop_page="+desktopPage,draggable:true,resizable:true}).Show();return false};gdTabControl=function(t){this.id=t;this.aTabs=BX.findChildren(BX(this.id),{tag:"span",class:"adm-detail-subtabs"},true);if(this.aTabs=="undefined"||this.aTabs==null||this.aTabs==false||this.aTabs.length==0)this.aTabs=BX.findChildren(BX(this.id),{tag:"span",class:"bx-gadgets-tab-new"},true);if(this.aTabs=="undefined"||this.aTabs==null||this.aTabs==false||this.aTabs.length==0)this.aTabs=BX.findChildren(BX(this.id),{tag:"span",class:"bx-gadgets-tab-wrap"},true)};gdTabControl.prototype.SelectTab=function(t){var e=BX(t.id+"_content");if(!e)e=BX(t+"_content");if(!e||e.style.display!="none")return;var a=false;for(var s=0,i=this.aTabs.length;s<i;s++){a=BX(this.aTabs[s]);BX.removeClass(a,"bx-gadgets-tab-active");BX.removeClass(a,"bx-gadgets-tab-new-active");if(a.style.display!="none"){if(BX(a.id+"_content"))BX(a.id+"_content").style.display="none";else if(BX(a.id.substr(9)+"_content"))BX(a.id.substr(9)+"_content").style.display="none"}}e.style.display="block";if(BX.hasClass(t,"bx-gadgets-tab-new"))BX.addClass(t,"bx-gadgets-tab-new-active");else if(BX.hasClass(t,"bx-gadgets-tab"))BX.addClass(t,"bx-gadgets-tab-active")};gdTabControl.prototype.LoadTab=function(t,e,a){if(a=="undefined")a=false;var s=BX(t.id+"_content");if(!s)s=BX(t+"_content");if(!s||s.style.display!="none")return;var i=false;for(var n=0,l=this.aTabs.length;n<l;n++){i=BX(this.aTabs[n]);BX.removeClass(i,"bx-gadgets-tab-active");BX.removeClass(i,"bx-gadgets-tab-new-active");if(i.style.display!="none"){if(BX(i.id+"_content"))BX(i.id+"_content").style.display="none";else if(BX(i.id.substr(9)+"_content"))BX(i.id.substr(9)+"_content").style.display="none"}}s.style.display="block";if(BX.hasClass(t,"bx-gadgets-tab-new"))BX.addClass(t,"bx-gadgets-tab-new-active");else if(BX.hasClass(t,"bx-gadgets-tab"))BX.addClass(t,"bx-gadgets-tab-active");var d=BX(t.id+"_content_node");if(d&&d.innerHTML.length<=0){BX.ajax.get(e,function(t){if(a)a.closeWait(s);d.innerHTML=t});if(a)a.showWait(s)}};gdTabControl.prototype.showWait=function(t){if(BX.type.isElementNode(t)){var e=BX.pos(t);t.bxwaiter=document.body.appendChild(BX.create("DIV",{props:{className:"adm-gadget-tab-waiter-img"},style:{top:parseInt((e.bottom+e.top)/2-10)+"px",left:parseInt((e.right+e.left)/2-10)+"px"}}));BX.ZIndexManager.register(t.bxwaiter);this.lastWaitElement=t;return t.bxwaiter}};gdTabControl.prototype.closeWait=function(t){t=t||this.lastWaitElement;if(BX.type.isElementNode(t)){if(t.bxwaiter){BX.ZIndexManager.unregister(t.bxwaiter);t.bxwaiter.parentNode.removeChild(t.bxwaiter);t.bxwaiter=null}if(this.lastWaitElement==t)this.lastWaitElement=null}};
//# sourceMappingURL=script_admin.map.js